﻿@model zichan.Models.OutModel
@{
    ViewBag.Title = "出库";
}

@section Pagetitle{
    @AdminCommon.PageTitle("出库", "编辑")
}
@section header{
    <style>
        .control-label {
            text-align: right;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="/assets/global/plugins/select2/select2.css" />
    <link href="/assets/global/css/plugins.css" rel="stylesheet" type="text/css" />
}
<div class="portlet-body form">
    <div class="form-body">
        <div class="row">
            @Html.Action("MessagePage", "Common", new { id = Model.AssetId })
            @if (Model.AssetClassId==1)
            {
                @Html.Action("partServer_Message", "Common", new { id = Model.AssetId })
            }
            else
            {
                @Html.Action("part_Message", "Common", new { id = Model.AssetId })
            }
        </div>
        @if (zichan.Common.PowerHelp.Check("RepertoryManage", "OutWareHouse"))
        {<div class="portlet">
            <div class="portlet-title">
                <div class="caption ">
                    <i class="fa fa-table"></i>出库操作
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-container">
                    <div class="dataTables_wrapper dataTables_extended_wrapper no-footer">
                            @using (Html.BeginForm("OutWareHouse", "RepertoryManage", FormMethod.Post, new { @class = "form-horizontal" }))
                            {<div class="form-body">
                                <input type="hidden" name="AssetId" value="@Model.AssetId" />
                                
                                 <div class="form-group ">
                                     <label class="col-md-3 control-label xh">负责人:</label>
                                     <div class="col-md-9">
                                         @Html.DropDownList("userId", (SelectList)ViewBag.userIds, "请选择负责人", new { @class = "form-control select2 input-large" })
                                         <span class="help-block">
                                             @Html.ValidationMessageFor(o => o.userId)
                                         </span>
                                     </div>
                                 </div>
                                 <div class="form-group ">
                                     <label class="col-md-3 control-label">出库原因或备注:</label>
                                     <div class="col-md-9">
                                         @Html.TextAreaFor(o => o.Remark, new { @class = "form-control input-large" })
                                     </div>
                                 </div>   
                                 <div class="row" style="margin-top:5px;">
                                     <div class="col-md-offset-3 col-md-9">
                                         <button type="submit" class="btn green">提交</button>
                                         <a href="/RepertoryManage/Index" class="btn default">返回</a>
                                     </div>
                                 </div> 
                            </div>}
                         
                    </div>
                </div>
            </div>
        </div>
        }
    </div>
</div>
@section footer{
@Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript" src="/assets/global/plugins/select2/select2.min.js"></script>
    <script type="text/javascript">
    $(function () {
        $('#userId').select2({
            placeholder: "",
            allowClear: false

        });
       
        
})
    </script>
}
